﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.Serialization;
using Se.Framework.Common.Data;

namespace Trust.Casas.Model.Entities
{
    [Table("SearchType")]
    [KnownType(typeof(IGenericEntity))]
    public class SearchType : IGenericEntity
    {
        [Key]
        [DataMember]
        public int Id { get; set; }

        [DataMember]
        [StringLength(150)]
        public string Name { get; set; }

        [DataMember]
        public object GenericId
        {
            get
            {
                return Id;
            }
        }

        public override string ToString()
        {
            return Name;
        }
    }
}
